//
//  PhoneNumView.swift
//  DiDiRecycle
//
//  Created by abb on 16/7/17.
//  Copyright © 2016年 abb. All rights reserved.
//

import UIKit

class PhoneNumView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
    }
    

    private func setupUI() {
        // 添加子控件
        addSubview(btn)
        addSubview(sepLine)
        addSubview(textField)
        // 布局子控件
        
    }
    
    // MARK: - 懒加载
    private lazy var btn: UIButton = {
        let btn = UIButton()
        btn.setTitle("+86", forState: .Normal)
        return btn
    }()
    private lazy var sepLine :UIView = {
        let view = UIView(frame: CGRect(x: 0, y: 0, width: 1, height: self.frame.height * 0.7))
        view.backgroundColor = UIColor.blackColor()
        return view
    }()
    private lazy var textField: UITextField = {
        let tf = UITextField()
        tf.placeholder = "请输入手机号码"
        tf.textAlignment = NSTextAlignment.Left
        tf.font = UIFont.systemFontOfSize(14)
        tf.clearButtonMode = UITextFieldViewMode.WhileEditing
        tf.keyboardType = UIKeyboardType.PhonePad
        tf.returnKeyType = UIReturnKeyType.Next
        tf.backgroundColor = UIColor.clearColor()
        return tf
    }()
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
